<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('shopCartAdminProducts/' . ($form->getObject()->isNew() ? 'create' : 'update') . (!$form->getObject()->isNew() ? '?id=' . $form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?> id="productForm" name="product">
    <div class="editProductBlock">
        <div class="porductFields"> 
            <?php echo $form ?>
        </div>
        <div class="porductImage">
            <div class="placeHolder">
                <?php if ($form->isNew()): ?>
                    Product Image Here
                <?php else: ?>
                    <img src="/<?php echo sfConfig::get('app_product_dir_images') . '/' . $form->getObject()->getImage() ?>">
                <?php endif ?>
            </div>
        </div>
    </div>
    <a class="submit button " onclick="$('#productForm').submit()">Save</a>
    <a class="back button left " href="<?php echo url_for('shopCartAdminProducts/index') ?>"> &laquo; Back to list</a>
</form>